

using System;
using System.Collections.Generic;
using System.Text;
using EntityLayer;
using System.Data;
using DataAccessLayer;

namespace DataLayer
{
	public class datBlogrollLinkContents
	{
		public datBlogrollLinkContents()
		{
		}
		
		#region  Code Factory Generated Methods
		public void DeleteBlogrollLinkContentsByBlogrollLinkContentId(entBlogrollLinkContents parEntBlogrollLinkContents, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pBlogrollLinkContentId",parEntBlogrollLinkContents.BlogrollLinkContentId);
			parDbConnector.ExecuteNonQuery("DeleteBlogrollLinkContentsByBlogrollLinkContentId",insDbParamCollection);
		}
		public void InsertBlogrollLinkContents(entBlogrollLinkContents parEntBlogrollLinkContents, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pBlogrollLinkId",parEntBlogrollLinkContents.BlogrollLinkId);
			insDbParamCollection.Add("@pLanguageId",parEntBlogrollLinkContents.LanguageId);
			insDbParamCollection.Add("@pBlogrollLinkName",parEntBlogrollLinkContents.BlogrollLinkName);
			insDbParamCollection.Add("@pBlogrollLinkDescription",parEntBlogrollLinkContents.BlogrollLinkDescription);
			insDbParamCollection.Add("@pBlogrollLink",parEntBlogrollLinkContents.BlogrollLink);
			insDbParamCollection.Add("@pBlogrollLinkRss",parEntBlogrollLinkContents.BlogrollLinkRss);
			insDbParamCollection.AddOutput("@pBlogrollLinkContentId",DbType.Int32);
			parDbConnector.ExecuteNonQuery("InsertBlogrollLinkContents",insDbParamCollection);
			parEntBlogrollLinkContents.BlogrollLinkContentId = Convert.ToInt32(insDbParamCollection.GetOutPutParameter().Value);
		}
		public void UpdateBlogrollLinkContentsByBlogrollLinkContentId(entBlogrollLinkContents parEntBlogrollLinkContents, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pBlogrollLinkContentId",parEntBlogrollLinkContents.BlogrollLinkContentId);
			
			insDbParamCollection.Add("@pBlogrollLinkId",parEntBlogrollLinkContents.BlogrollLinkId);
			insDbParamCollection.Add("@pLanguageId",parEntBlogrollLinkContents.LanguageId);
			insDbParamCollection.Add("@pBlogrollLinkName",parEntBlogrollLinkContents.BlogrollLinkName);
			insDbParamCollection.Add("@pBlogrollLinkDescription",parEntBlogrollLinkContents.BlogrollLinkDescription);
			insDbParamCollection.Add("@pBlogrollLink",parEntBlogrollLinkContents.BlogrollLink);
			insDbParamCollection.Add("@pBlogrollLinkRss",parEntBlogrollLinkContents.BlogrollLinkRss);
			parDbConnector.ExecuteNonQuery("UpdateBlogrollLinkContentsByBlogrollLinkContentId",insDbParamCollection);
		}

		#endregion

        public DataTable SelectBlogrollLinkContentsByBlogrollLinkId(entBlogrollLinkContents parEntBlogrollLinkContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pBlogrollLinkId", parEntBlogrollLinkContents.BlogrollLinkId);
            return parDbConnector.ExecuteDataTable("SelectBlogrollLinkContentsByBlogrollLinkId", insDbParamCollection);
        }
        public void DeleteBlogrollLinkContentsByBlogrollLinkId(entBlogrollLinkContents parEntBlogrollLinkContents, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pBlogrollLinkId", parEntBlogrollLinkContents.BlogrollLinkId);
            parDbConnector.ExecuteNonQuery("DeleteBlogrollLinkContentsByBlogrollLinkId", insDbParamCollection);
        }
	}
}